<template>
  <basic-container>
    <!-- START goBack -->
    <div class="el-page-header haruyuki-mb-20">
      <div class="haruyuki-page-header-left haruyuki-size-18" @click="goBack">
        <i class="el-icon-arrow-left"></i>
        <div class="haruyuki-size-16">返回</div>
      </div>
      <div class="el-page-header__content">分账项目详情</div>
    </div>
    <!-- END goBack -->
    <project-details :project-id="projectCode" />
  </basic-container>
</template>
  
<script>
import projectDetails from "./components/project-details";
export default {
  name: "SeparateProjectDetails",
  components: {
    projectDetails,
  },
  data() {
    return {
      projectCode: null,
    };
  },
  watch: {
    "$route.query.d": {
      handler(val) {
        if (val) {
          const param = JSON.parse(this.$crypto.decrypt(val));
          const { projectCode } = param;
          this.projectCode = projectCode;
        }
      },
      immediate: true,
    },
  },
  methods: {
    goBack() {
      this.$router.$avueRouter.closeTag();
      this.$router.back();
    },
  },
};
</script>